#!/usr/bin/env python
# coding=utf-8

# 获取指定excel表内实际内容的行列数

import xlwings as xw
import os

app = xw.App(visible=False, add_book=False)
workbook = app.books.open('text.xlsx')
worksheet = workbook.sheets['测试1']
pp = worksheet.used_range.shape  # 获取指定excel表内实际内容的行列数

print(pp)

workbook.close()
app.quit()
